home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / MacTechNotes / Platforms & Tools / Stand-Alone Code Folder / BigBroƒ / BigBro.p < prev    next >
Encoding:
Text File  |  1990-07-24  |  996 b   |  53 lines  |  [TEXT/MPS ]

  1.  
  2. UNIT BigBro;
  3.  
  4. INTERFACE
  5.  
  6.     USES
  7.         Types, SAGlobals, OSUtils,
  8.         QuickDraw, Fonts, Windows, Menus, TextEdit, Dialogs,
  9.         Resources, Sound, ToolUtils;
  10.     
  11.     PROCEDURE BeAPest;
  12.  
  13. IMPLEMENTATION
  14.  
  15.     PROCEDURE BeAPest;
  16.     CONST
  17.         kBigBroDLOG = 128;
  18.     VAR
  19.         A5Ref: A5RefType;
  20.         oldA5: Longint;
  21.         numSnds, i, itemHit: Integer;
  22.         theSnd: Handle;
  23.         playStatus: OSErr;
  24.         orwell: DialogPtr;
  25.     BEGIN
  26.         IF NOT Button THEN BEGIN
  27.             oldA5 := OpenA5World(A5Ref);
  28.             IF A5Ref <> NIL THEN BEGIN
  29.                 InitGraf(@thePort);
  30.                 InitFonts;
  31.                 InitWindows;
  32.                 InitMenus;
  33.                 TEInit;
  34.                 InitDialogs(NIL);
  35.                 InitCursor;
  36.                 orwell := GetNewDialog(kBigBroDLOG, NIL, WindowPtr(-1));
  37.                 numSnds := CountResources('snd ');
  38.                 FOR i := 1 TO numSnds DO BEGIN
  39.                     theSnd := GetIndResource('snd ',i);
  40.                     IF theSnd <> NIL THEN
  41.                         playStatus := SndPlay(NIL,theSnd,FALSE);
  42.                     END;
  43.                 REPEAT
  44.                     ModalDialog(NIL, itemHit);
  45.                 UNTIL itemHit = 1;
  46.                 DisposDialog(orwell);
  47.             CloseA5World(oldA5, A5Ref);
  48.             END;
  49.         END;
  50.     END;
  51.  
  52. END.
  53.